package com.example.navigation.api.login

import com.example.navigation.api.ResponseData
import retrofit2.http.Body
import retrofit2.http.POST

/**
 * Created with IntelliJ IDEA.
 * @Author: Liao Run
 * @Date: 2024-06-08 10:10
 * @Description:
 **/
interface LoginApi {

    data class LoginParams(val account: String, val password: String, val type: Boolean)

    data class UserInfo(
        val token: String,
        val username: String,
        val id: Int,
        val site_id: Int,
        val type: Boolean
    )

    @POST("/user/glogoin")
    suspend fun login(@Body loginParams: LoginParams): ResponseData<UserInfo>
}